<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<style type="text/css">
		.jia{
			width: 600px;
			height: 50px;
			margin: 0 auto;
			text-align: center;
		}
		.wu{
			width: 1000px;
			height:500px;
			background:#7092BE;
			margin: 0 auto;
		}
		.wu td{
			width: 197px;
			float: left;
			text-align: center;
			color: #B5E61D;
			margin-bottom: 20px
		}
		.qing{
			width: 600px;
			height: 50px;
			margin: 0 auto;
			text-align: center;
		}
		.liu img{
			display:block;
			width: 40px;
			height: 40px;
			margin-left: 70px
		}
		.zhi{
			border: 1px solid #333;
			background: #fff;
			color: #333;
			text-decoration: none;
			font-family: '微软雅黑'
		}
		</style>
</head>
<body>
	<div class="jia"><h1>上传下载</h1></div>
	<form action="./add.php" method="post" enctype="multipart/form-data" class="qing">
		<input type="file" name="liu">
		<input type="submit">
	 </form> 
	<div class="wu">
	<table>
		<tr>
			<td>图片</td>
			<td>文件</td>
			<td>修改时间</td>
			<td>文件大小</td>
			<td>操作</td>
		</tr>

		<?php $arr = glob('./img/*'); ?>
		<?php foreach ($arr as $k => $v) { ?>
			<tr>
				<td class="liu"><?php echo tp($v); ?></td>
				<td><?php echo basename($v) ; ?></td>
				<td><?php echo date('Y.m.d h.i.s',filemtime($v)); ?></td>
				<td><?php echo filesize($v); ?></td>
				<td>
				<a href="./del.php?id=<?php echo $k ?>" role="button" class='zhi'>删除</a>
				<a href="./del1.php?url=<?php echo $v ?>" role="button" class='zhi'>下载</a>
				</td>
			</tr>
			
		<?php } ?>
		
	</table>
	</div>
	

</body>
</html>